RCS file: /net/acae127/home/bammi/etc/src/master/gnu/gcc/c-lex.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 c-lex.c
*** 1.1.1.1	1993/05/18 23:51:34
--- c-lex.c	1993/05/21 12:35:17
***************
*** 474,485 ****
--- 474,487 ----
  	case '\r':
  	  /* ANSI C says the effects of a carriage return in a source file
  	     are undefined.  */
+ #ifndef atarist /* but not on an atarist, though hopefully we should'nt see it */
  	  if (pedantic && !newline_warning)
  	    {
  	      warning ("carriage return in source file");
  	      warning ("(we only warn about the first carriage return)");
  	      newline_warning = 1;
  	    }
+ #endif
  	  c = getc (finput);
  	  break;
  
===================================================================
RCS file: /net/acae127/home/bammi/etc/src/master/gnu/gcc/calls.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 calls.c
*** 1.1.1.1	1993/05/18 23:51:36
--- calls.c	1993/05/21 12:35:20
***************
*** 2023,2028 ****
--- 2023,2034 ----
  
    argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
  
+ /* how would you do this RIGHT ?? fake a DECL node? dunno... */
+ #ifdef ENCODE_SECTION_INFO
+   /* mark it as a function (to be in the text section that is) */
+   SYMBOL_REF_FLAG (fun) = 1;
+ #endif
+ 
    INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
  
    args_size.constant = 0;
===================================================================
RCS file: /net/acae127/home/bammi/etc/src/master/gnu/gcc/cccp.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 cccp.c
*** 1.1.1.1	1993/05/18 23:51:37
--- cccp.c	1993/05/21 12:35:26
***************
*** 77,82 ****
--- 77,83 ----
  #include <stdio.h>
  #include <signal.h>
  
+ #ifndef atarist
  #ifndef VMS
  #ifndef USG
  #include <sys/time.h>		/* for __DATE__ and __TIME__ */
***************
*** 86,95 ****
--- 87,110 ----
  #include <fcntl.h>
  #endif /* USG */
  #endif /* not VMS */
+ #endif /* not atarist */
  
  /* This defines "errno" properly for VMS, and gives us EACCES. */
  #include <errno.h>
  
+ /* atarist  specific defs and includes */
+ #ifdef atarist
+ #include <time.h>
+ #include <file.h>
+ #include <string.h>
+ #include <stddef.h>
+ 
+ long _stksize = -1L;	/* want big stack cause include files
+ 				   get alloca'ed there */
+ 
+ #define read(fd,buf,size)	_text_read(fd,buf,size)
+ #endif /* atarist */
+ 
  /* VMS-specific definitions */
  #ifdef VMS
  #include <time.h>
***************
*** 969,974 ****
--- 984,1010 ----
  /* Nonzero means -I- has been seen,
     so don't look for #include "foo" the source-file directory.  */
  static int ignore_srcdir;
+  
+ #ifdef atarist
+ /* the following dingus is used in place of some calls to bcopy,
+    to ensure that backslashes get properly slashified when getting
+    shoved into strings.  Note that it returns the new pointer!!
+    There ought to be a better way... */
+ 
+ U_CHAR * slashifying_bcopy(from_buf, to_buf, nbytes)
+ U_CHAR * from_buf, * to_buf;
+ int nbytes;
+ {
+   for ( ; nbytes > 0 ; )
+ 	{
+ 	if(*from_buf == '\\')
+ 		*to_buf++ = '\\';
+ 	*to_buf++ = *from_buf++;
+ 	nbytes--;
+ 	}
+   return(to_buf);
+ }
+ #endif		/* atarist */
  
  int
  main (argc, argv)
***************
*** 1009,1014 ****
--- 1045,1055 ----
    /* Target-name to write with the dependency information.  */
    char *deps_target = 0;
  
+ #ifdef atarist
+ /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
+ /*  _malloczero(1); */ 	/* zero mallocs by default */
+ #endif  
+ 
  #ifdef RLIMIT_STACK
    /* Get rid of any avoidable limit on stack size.  */
    {
***************
*** 1285,1294 ****
--- 1326,1341 ----
  	break;
  
        case 'v':
+ #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
+ #include "PatchLev.h"
+ 	fprintf (stderr, "GNU CPP-atariST version %s Patchlevel %s",
+ 		 version_string, PatchLevel);
+ #else
  	fprintf (stderr, "GNU CPP version %s", version_string);
  #ifdef TARGET_VERSION
  	TARGET_VERSION;
  #endif
+ #endif
  	fprintf (stderr, "\n");
  	break;
  
***************
*** 1420,1425 ****
--- 1467,1473 ----
      }
    }
  
+ #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
    /* Add dirs from CPATH after dirs from -I.  */
    /* There seems to be confusion about what CPATH should do,
       so for the moment it is not documented.  */
***************
*** 1429,1434 ****
--- 1477,1483 ----
    p = (char *) getenv ("CPATH");
    if (p != 0 && ! no_standard_includes)
      path_include (p);
+ #endif
  
    /* Now that dollars_in_ident is known, initialize is_idchar.  */
    initialize_char_syntax ();
***************
*** 1547,1554 ****
    { /* read the appropriate environment variable and if it exists
         replace include_defaults with the listed path. */
      char *epath = 0;
      switch ((objc << 1) + cplusplus)
!       {
        case 0:
  	epath = getenv ("C_INCLUDE_PATH");
  	break;
--- 1596,1651 ----
    { /* read the appropriate environment variable and if it exists
         replace include_defaults with the listed path. */
      char *epath = 0;
+ #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
+     int db_hack = 0;
+     char *e1 = getenv("GNUINC"), *e2 = getenv("GNULIB"),
+          *e3 = getenv("GXXINC");
+ 
+ 
+     /* Get length of the alloc'ed array. (Yeah I know, I might alloc
+      * a character more than I need but who cares...
+      */
+     if (cplusplus && e3)
+ 	db_hack += strlen (e3);
+     if (e1)
+ 	    db_hack += strlen (e1) + 1;
+     if (e2)
+ 	    db_hack += strlen (e1) + 1;
+ 
+     if (db_hack) {
+ 	epath = alloca (db_hack + 1);
+ 	*epath = '\0';
+ 	db_hack = 0;
+ 
+ 	/* Concatenate the paths together. */
+ 	if (cplusplus && e3) {
+ 	    strcpy (epath, e3);
+ 	    db_hack = 1;
+ 	}
+ 	if (e1) {
+ 	    if (db_hack) {
+ 		strcat (epath, PATH_SEP_STR);
+ 	    }
+ 	    strcat (epath, e1);
+ 	    db_hack = 1;
+ 	}
+ 	if (e2) {
+ 	    if (db_hack) {
+ 		strcat (epath, PATH_SEP_STR);
+ 	    }
+ 	    strcat (epath, e2);
+ 	}
+     }
+ 
+ #ifdef atarist
+     if (epath)
+     	for (e3=epath; *e3; e3++)	/* Use one kind of path separator */
+ 	    if (*e3 == ';')
+ 		*e3 = PATH_SEPARATOR;
+ #endif
+ #else
      switch ((objc << 1) + cplusplus)
!     {
        case 0:
  	epath = getenv ("C_INCLUDE_PATH");
  	break;
***************
*** 1561,1567 ****
        case 3:
  	epath = getenv ("OBJCPLUS_INCLUDE_PATH");
  	break;
!       }
      /* If the environment var for this language is set,
         add to the default list of include directories.  */
      if (epath) {
--- 1658,1666 ----
        case 3:
  	epath = getenv ("OBJCPLUS_INCLUDE_PATH");
  	break;
!     }
! #endif
! 
      /* If the environment var for this language is set,
         add to the default list of include directories.  */
      if (epath) {
***************
*** 1615,1627 ****
--- 1714,1736 ----
    if (!no_standard_includes) {
      struct default_include *p = include_defaults;
      char *specd_prefix = include_prefix;
+ #ifdef GCC_INCLUDE_DIR
      char *default_prefix = savestring (GCC_INCLUDE_DIR);
+ #else
+     char *default_prefix = savestring ("./");
+ #endif
      int default_len = 0;
      /* Remove the `include' from /usr/local/lib/gcc.../include.  */
      if (!strcmp (default_prefix + strlen (default_prefix) - 8, "/include")) {
        default_len = strlen (default_prefix) - 7;
        default_prefix[default_len] = 0;
      }
+ #ifdef atarist
+     else if (!strcmp (default_prefix + strlen (default_prefix) - 8, "\\include")) {
+       default_len = strlen (default_prefix) - 7;
+       default_prefix[default_len] = 0;
+     }
+ #endif
      /* Search "translated" versions of GNU directories.
         These have /usr/local/lib/gcc... replaced by specd_prefix.  */
      if (specd_prefix != 0 && default_len != 0)
***************
*** 1749,1755 ****
--- 1858,1868 ----
        char *p1 = p;
        /* Discard all directory prefixes from P.  */
        while (*p1) {
+ #ifdef atarist
+ 	if ((*p1 == '/') || (*p1 == '\\'))
+ #else
  	if (*p1 == '/')
+ #endif
  	  p = p1 + 1;
  	p1++;
        }
***************
*** 1923,1928 ****
--- 2036,2042 ----
    return 0;
  }
  
+ #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
  /* Given a colon-separated list of file names PATH,
     add all the names to the search path for include files.  */
  
***************
*** 1969,1974 ****
--- 2083,2089 ----
        p++;
      }
  }
+ #endif /* atarist */
  
  /* Pre-C-Preprocessor to translate ANSI trigraph idiocy in BUF
     before main CCCP processing.  Name `pcp' is also in honor of the
***************
*** 3146,3151 ****
--- 3261,3267 ----
    assertions_flag = save_assertions_flag;
    return obuf;
  }
+ /* #endif */
  
  /*
   * Process a # directive.  Expects IP->bufp to point after the '#', as in
***************
*** 3608,3615 ****
--- 3724,3740 ----
  
        if (string)
  	{
+ #ifndef atarist
  	  buf = (char *) alloca (3 + strlen (string));
  	  sprintf (buf, "\"%s\"", string);
+ #else
+     	  buf = (char *) alloca (16 + strlen (string));
+           {
+ 	      char *tbuf = (char *) alloca (16 + strlen (string));
+ 	      (void) slashifying_bcopy(string, tbuf, strlen(string)+1);
+ 	      sprintf (buf, "\"%s\"", tbuf);
+           }
+ #endif /* atarist */
  	}
        else
  	buf = "\"\"";
***************
*** 3841,3847 ****
--- 3966,3977 ----
  	    dsp[0].next = search_start;
  	    search_start = dsp;
  #ifndef VMS
+ #ifdef atarist
+ 	    if((ep = rindex(nam, '\\')) == NULL)
+ 		ep = rindex(nam, '/');
+ #else
  	    ep = rindex (nam, '/');
+ #endif
  #else				/* VMS */
  	    ep = rindex (nam, ']');
  	    if (ep == NULL) ep = rindex (nam, '>');
***************
*** 3921,3929 ****
--- 4051,4073 ----
  
    /* If specified file name is absolute, just open it.  */
  
+ #ifdef atarist
+   if ((*fbeg == '\\') || (*fbeg == '/')) {
+     if(fbeg[2] == ':')
+     { /* allow "\D:\xxx" */
+         strncpy (fname, fbeg+1, flen-1);
+         fname[flen-1] = 0;
+     }
+     else
+     {  /* allow "\lib\xxx" == "\currentdrive:\lib\xxx" */
+         strncpy (fname, fbeg, flen);
+         fname[flen] = 0;
+     }
+ #else
    if (*fbeg == '/') {
      strncpy (fname, fbeg, flen);
      fname[flen] = 0;
+ #endif
      if (redundant_include_p (fname))
        return 0;
      if (importing)
***************
*** 3944,3950 ****
--- 4088,4098 ----
  	if (searchptr->fname[0] == 0)
  	  continue;
  	strcpy (fname, searchptr->fname);
+ #ifdef atarist
+ 	strcat (fname, "\\");
+ #else
  	strcat (fname, "/");
+ #endif
  	fname[strlen (fname) + flen] = 0;
        } else {
  	fname[0] = 0;
***************
*** 4054,4070 ****
  
      if (!no_precomp)
        do {
  	sprintf (pcftry, "%s%d", fname, pcfnum++);
  	
  	pcf = open (pcftry, O_RDONLY, 0666);
  	if (pcf != -1)
  	  {
  	    struct stat s;
  
  	    fstat (pcf, &s);
  	    if (bcmp (&stat_f.st_ino, &s.st_ino, sizeof (s.st_ino))
  		|| stat_f.st_dev != s.st_dev)
! 	      {
  		pcfbuf = check_precompiled (pcf, fname, &pcfbuflimit);
  		/* Don't need it any more.  */
  		close (pcf);
--- 4202,4260 ----
  
      if (!no_precomp)
        do {
+ #ifdef atarist
+ 	int numlen;
+ 	char *dot;
+ 	char *slash;
+ 
+ 	/* cut extension to 3 chars and dont depend on UNIXMODE           */
+ 	/* this will have to be done when saving precompiled headers, too */
+ 	/* but as far as I tried, they dont work up to now, anyway   (AL) */
+ 
+ 	  if( pcfnum>=100 )     numlen=3;
+ 	  else if( pcfnum>=10 ) numlen=2;
+ 	  else                  numlen=1;
+ 
+ 	  dot=strrchr( fname, '.' );
+ 	  if( (slash=strrchr( fname, '/')) && slash>dot )
+ 	    dot=NULL;
+ 	  else
+ 	  if( (slash=strrchr( fname, '\\')) && slash>dot )
+ 	    dot=NULL;
+ 
+ 	  if( dot ) {
+ 	    if( strlen(dot)-1>3-numlen ) {
+ 	      sprintf(pcftry, "%.*s%d", strlen(fname)-(strlen(dot)-(4-numlen)),
+ 	      		fname, pcfnum++);
+ 	    } else {
+ 	      sprintf(pcftry, "%s%d", fname, pcfnum++);
+ 	    }
+ 	  } else {
+ 	    sprintf( pcftry, "%s.%d", fname, pcfnum++);
+ 	  }
+ #else	/* looks like we got a sane filesystem */
  	sprintf (pcftry, "%s%d", fname, pcfnum++);
+ #endif
+ #if 0
+ 	fprintf ( stderr, "trying precompiled file %s.\n", pcftry );
+ #endif
  	
  	pcf = open (pcftry, O_RDONLY, 0666);
  	if (pcf != -1)
  	  {
+ #ifndef atarist
+ 	    /* dont bother with this on the ST since these field are faked
+ 	     * anyways
+              */
  	    struct stat s;
  
  	    fstat (pcf, &s);
  	    if (bcmp (&stat_f.st_ino, &s.st_ino, sizeof (s.st_ino))
  		|| stat_f.st_dev != s.st_dev)
! #else
! 	    if (1)
! #endif
!               {
  		pcfbuf = check_precompiled (pcf, fname, &pcfbuflimit);
  		/* Don't need it any more.  */
  		close (pcf);
***************
*** 6958,6965 ****
--- 7148,7159 ----
    check_expand (op, len + 1);
    if (op->bufp > op->buf && op->bufp[-1] != '\n')
      *op->bufp++ = '\n';
+ #ifdef atarist
+   op->bufp = slashifying_bcopy (line_cmd_buf, op->bufp, len);
+ #else
    bcopy (line_cmd_buf, op->bufp, len);
    op->bufp += len;
+ #endif
    op->lineno = ip->lineno;
  }
  
***************
*** 8703,8708 ****
--- 8897,8903 ----
    deps_buffer[deps_size] = 0;
  }
  
+ #if (!(defined(atarist) || defined(atariminix)))
  #if defined(USG) || defined(VMS)
  #ifndef BSTRING
  
***************
*** 8739,8745 ****
  }
  #endif /* not BSTRING */
  #endif /* USG or VMS */
! 
  
  static void
  fatal (str, arg)
--- 8934,8940 ----
  }
  #endif /* not BSTRING */
  #endif /* USG or VMS */
! #endif /* any atari */
  
  static void
  fatal (str, arg)
===================================================================
RCS file: /net/acae127/home/bammi/etc/src/master/gnu/gcc/cp-tree.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 cp-tree.c
*** 1.1.1.1	1993/05/18 23:51:50
--- cp-tree.c	1993/05/21 12:35:31
***************
*** 1651,1656 ****
--- 1651,1657 ----
    print_class_statistics ();
  }
  
+ #ifndef atarist
  /* This is used by the `assert' macro.  It is provided in libgcc.a,
     which `cc' doesn't know how to link.  Note that the C++ front-end
     no longer actually uses the `assert' macro (instead, it calls
***************
*** 1673,1678 ****
--- 1674,1680 ----
    fflush (stderr);
    abort ();
  }
+ #endif
  
  /* Return, as an INTEGER_CST node, the number of elements for
     TYPE (which is an ARRAY_TYPE).  This counts only elements of the top array. */
===================================================================
RCS file: /net/acae127/home/bammi/etc/src/master/gnu/gcc/gcc.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 gcc.c
*** 1.1.1.1	1993/05/18 23:52:03
--- gcc.c	1993/05/21 12:35:34
***************
*** 30,35 ****
--- 30,44 ----
  Once it knows which kind of compilation to perform, the procedure for
  compilation is specified by a string called a "spec".  */
  
+ #ifdef CROSSATARI
+ #ifdef atarist
+ #undef atarist
+ #endif
+ #ifdef atariminix
+ #undef atariminix
+ #endif
+ #endif
+   
  #include <sys/types.h>
  #include <ctype.h>
  #include <signal.h>
***************
*** 65,71 ****
  #define NULL_PTR ((GENERIC_PTR)0)
  #endif
  
! #ifdef USG
  #define vfork fork
  #endif /* USG */
  
--- 74,80 ----
  #define NULL_PTR ((GENERIC_PTR)0)
  #endif
  
! #if (defined(USG) || defined(atariminix))
  #define vfork fork
  #endif /* USG */
  
***************
*** 97,102 ****
--- 106,124 ----
  #define PATH_SEPARATOR ':'
  #endif
  
+ #ifdef CROSSATARI
+ #include <ctype.h>
+ #include <string.h>
+ #endif
+ 
+ #ifdef atarist
+ #include <osbind.h>
+ #include <ctype.h>
+ #include <fcntl.h>		/* fgth, for redirection of stderr */
+ #include <string.h>
+ long _stksize = 8192;
+ #endif
+ 
  #define obstack_chunk_alloc xmalloc
  #define obstack_chunk_free free
  
***************
*** 157,163 ****
--- 179,187 ----
     pass the compiler in building the list of pointers to constructors
     and destructors.  */
  
+ #if (!(defined(CROSSATARI) || defined(atarist)))
  static struct obstack collect_obstack;
+ #endif
  
  extern char *version_string;
  
***************
*** 453,459 ****
  		   %{aux-info*}\
  		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
                        %{!pipe:%g.s} %A\n }}}}"},
    {"-",
--- 477,483 ----
  		   %{aux-info*}\
  		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!               %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
                        %{!pipe:%g.s} %A\n }}}}"},
    {"-",
***************
*** 486,492 ****
  		   %{aux-info*}\
  		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
                        %{!pipe:%g.s} %A\n }}}}"},
    {".h", "@c-header"},
--- 510,516 ----
  		   %{aux-info*}\
  		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!               %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
                        %{!pipe:%g.s} %A\n }}}}"},
    {".h", "@c-header"},
***************
*** 521,527 ****
  		   %{aux-info*}\
  		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
                        %{!pipe:%g.s} %A\n }}}}"},
    {".i", "@cpp-output"},
--- 545,551 ----
  		   %{aux-info*}\
  		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!               %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
                        %{!pipe:%g.s} %A\n }}}}"},
    {".i", "@cpp-output"},
***************
*** 532,538 ****
  	%{aux-info*}\
  	%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  	%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!     %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
              %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %{!pipe:%g.s} %A\n }"},
    {".ii", "@c++-cpp-output"},
    {"@c++-cpp-output",
--- 556,562 ----
  	%{aux-info*}\
  	%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  	%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!     %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
              %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %{!pipe:%g.s} %A\n }"},
    {".ii", "@c++-cpp-output"},
    {"@c++-cpp-output",
***************
*** 542,555 ****
  	    %{aux-info*}\
  	    %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  	    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!        %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
  	       %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  	       %{!pipe:%g.s} %A\n }"},
    {".s", "@assembler"},
    {"@assembler",
!    "%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
              %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %i %A\n }"},
    {".S", "@assembler-with-cpp"},
    {"@assembler-with-cpp",
     "cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
--- 566,582 ----
  	    %{aux-info*}\
  	    %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  	    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!        %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
  	       %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  	       %{!pipe:%g.s} %A\n }"},
    {".s", "@assembler"},
    {"@assembler",
!    "%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
              %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %i %A\n }"},
    {".S", "@assembler-with-cpp"},
+   {".ss", "@assembler-with-cpp"},
+   {".cpp", "@assembler-with-cpp"},
+   {".spp", "@assembler-with-cpp"},
    {"@assembler-with-cpp",
     "cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
  	%{C:%{!E:%eGNU C does not support -C without using -E}}\
***************
*** 559,565 ****
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*}\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
!    "%{!M:%{!MM:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
                      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  		    %{!pipe:%g.s} %A\n }}}}"},
    /* Mark end of table */
--- 586,592 ----
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*}\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
!    "%{!M:%{!MM:%{!E:%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
                      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
  		    %{!pipe:%g.s} %A\n }}}}"},
    /* Mark end of table */
***************
*** 573,578 ****
--- 600,614 ----
  
  /* Here is the spec for running the linker, after compiling all files.  */
  
+ #if (defined(CROSSATARI) || defined(atarist) || defined(atariminix))
+ static char *link_command_spec = 
+  "%{!fsyntax-only: \
+     %{!c:%{!M*:%{!E:%{!S:ld %X %{v} %{G} %{o*} %l\
+       %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
+       %{y*} %{!nostdlib:%S} \
+       %{L*} %o %{!nostdlib:%s %L}\n }}}}}";
+ 
+ #else
  /* -u* was put back because both BSD and SysV seem to support it.  */
  /* %{static:} simply prevents an error message if the target machine
     doesn't handle -static.  */
***************
*** 603,608 ****
--- 639,645 ----
  			%{L*} %D %o %{!nostdlib:-lgcc %L -lgcc %{!A:%E}}\n }}}}}}";
  #endif
  #endif
+ #endif
  
  /* A vector of options to give to the linker.
     These options are accumulated by -Xlinker and -Wl,
***************
*** 821,826 ****
--- 858,864 ----
    *argcp = newindex;
  }
  
+ #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
  /* Read compilation specs from a file named FILENAME,
     replacing the default ones.
  
***************
*** 959,964 ****
--- 997,1003 ----
  
    return p;
  }
+ #endif /* ataris */
  
  /* Structure to keep track of the specs that have been defined so far.  These
     are accessed using %(specname) or %[specname] in a compiler or link spec. */
***************
*** 1075,1080 ****
--- 1114,1126 ----
  /* Name with which this program was invoked.  */
  
  static char *programname;
+ 
+ #ifdef atarist
+ /* Flag indicating, that stderr should be redirected for the child
+    processes */
+ 
+ unsigned char zflag;
+ #endif
  
  /* Structures to keep track of prefixes to try when looking for files. */
  
***************
*** 1333,1340 ****
  static void
  choose_temp_base ()
  {
-   char *base = getenv ("TMPDIR");
    int len;
  
    if (base == (char *)0)
      {
--- 1379,1403 ----
  static void
  choose_temp_base ()
  {
    int len;
+ #if (!(defined(atarist) || defined(atariminix)))
+   char *base = getenv ("TMPDIR");
+ #else
+   char *base = getenv ("TEMP");
+ 
+   if(base == (char *)0)
+   {
+       base = getenv("TMPDIR");
+       if(base == (char *)0)
+       base = getenv("TMP");
+   }
+   if(base != (char *)0)
+   {
+       char *newbase = alloca(FILENAME_MAX);
+       dos2unx(base,newbase);
+       base = newbase;
+   }
+ #endif
  
    if (base == (char *)0)
      {
***************
*** 1354,1360 ****
    len = strlen (base);
    temp_filename = xmalloc (len + sizeof("/ccXXXXXX"));
    strcpy (temp_filename, base);
!   if (len > 0 && temp_filename[len-1] != '/')
      temp_filename[len++] = '/';
    strcpy (temp_filename + len, "ccXXXXXX");
  
--- 1417,1427 ----
    len = strlen (base);
    temp_filename = xmalloc (len + sizeof("/ccXXXXXX"));
    strcpy (temp_filename, base);
!   if (len > 0 && (temp_filename[len-1] != '/' 
! #ifdef atarist
! 		  || temp_filename[len-1] != '\\'
! #endif
!  		  ))
      temp_filename[len++] = '/';
    strcpy (temp_filename + len, "ccXXXXXX");
  
***************
*** 1373,1378 ****
--- 1440,1446 ----
     use come from an obstack, we don't have to worry about allocating
     space for them.  */
  
+ #if (!(defined(CROSSATARI) || defined(atarist)))
  #ifndef HAVE_PUTENV
  
  void
***************
*** 1474,1479 ****
--- 1542,1548 ----
    obstack_1grow (&collect_obstack, '\0');
    putenv (obstack_finish (&collect_obstack));
  }
+ #endif /* ataris */
  
  
  /* Search for NAME using the prefix list PREFIXES.  MODE is passed to
***************
*** 1749,1754 ****
--- 1818,1824 ----
  
  #else /* not __MSDOS__ */
  
+ #ifndef atarist
  static int
  pexecute (search_flag, program, argv, not_last)
       int search_flag;
***************
*** 1837,1842 ****
--- 1907,1913 ----
      }
  }
  
+ #endif /* not atarist */
  #endif /* not __MSDOS__ */
  #else /* not OS2 */
  
***************
*** 1867,1882 ****
      {
        char *prog;		/* program name.  */
        char **argv;		/* vector of args.  */
        int pid;			/* pid of process for this command.  */
      };
  
    struct command *commands;	/* each command buffer with above info.  */
  
    /* Count # of piped commands.  */
    for (n_commands = 1, i = 0; i < argbuf_index; i++)
      if (strcmp (argbuf[i], "|") == 0)
        n_commands++;
! 
    /* Get storage for each command.  */
    commands
      = (struct command *) alloca (n_commands * sizeof (struct command));
--- 1938,1958 ----
      {
        char *prog;		/* program name.  */
        char **argv;		/* vector of args.  */
+ #ifndef atarist
        int pid;			/* pid of process for this command.  */
+ #endif
      };
  
    struct command *commands;	/* each command buffer with above info.  */
  
+ #ifndef atarist
    /* Count # of piped commands.  */
    for (n_commands = 1, i = 0; i < argbuf_index; i++)
      if (strcmp (argbuf[i], "|") == 0)
        n_commands++;
! #else
!   n_commands = 1;
! #endif
    /* Get storage for each command.  */
    commands
      = (struct command *) alloca (n_commands * sizeof (struct command));
***************
*** 1891,1896 ****
--- 1967,1973 ----
    if (string)
      commands[0].argv[0] = string;
  
+ #ifndef atarist
    for (n_commands = 1, i = 0; i < argbuf_index; i++)
      if (strcmp (argbuf[i], "|") == 0)
        {				/* each command.  */
***************
*** 1905,1910 ****
--- 1982,1990 ----
  	  commands[n_commands].argv[0] = string;
  	n_commands++;
        }
+ #else
+   n_commands = 1;
+ #endif
  
    argbuf[argbuf_index] = 0;
  
***************
*** 1920,1928 ****
--- 2000,2010 ----
  	  for (j = commands[i].argv; *j; j++)
  	    fprintf (stderr, " %s", *j);
  
+ #ifndef atarist
  	  /* Print a pipe symbol after all but the last command.  */
  	  if (i + 1 != n_commands)
  	    fprintf (stderr, " |");
+ #endif
  	  fprintf (stderr, "\n");
  	}
        fflush (stderr);
***************
*** 1937,1953 ****
--- 2019,2045 ----
  #endif /* DEBUG */
      }
  
+ #ifndef atarist
    /* Run each piped subprocess.  */
  
    last_pipe_input = STDIN_FILE_NO;
    for (i = 0; i < n_commands; i++)
      {
+ #ifndef atariminix
        char *string = commands[i].argv[0];
  
        commands[i].pid = pexecute (string != commands[i].prog,
  				  string, commands[i].argv,
  				  i + 1 < n_commands);
  
+ #else
+       extern int execv();
+       char *string = commands[i].argv[0];
+ 
+       commands[i].pid = pexecute (execv,
+ 				  string, commands[i].argv,
+ 				  i + 1 < n_commands);
+ #endif
        if (string != commands[i].prog)
  	free (string);
      }
***************
*** 1994,1999 ****
--- 2086,2136 ----
        }
      return ret_code;
    }
+ #else /* atarist */
+  {
+      register int iii;
+      int errfd, oldfd;
+      char **j;
+ 
+      execution_count++;
+ 
+      if (zflag)
+        {
+ 	 errfd = Fopen("compile.err", 2);
+ 	 if (errfd < __SMALLEST_VALID_HANDLE)
+ 	   errfd = Fcreate("compile.err", 0);
+ 	 else
+ 	   Fseek(0L, errfd, 2);
+ 	 if (errfd >= __SMALLEST_VALID_HANDLE)
+ 	   {
+ 	     oldfd = Fdup (2);
+ 	     Fforce(2, errfd);
+ 	   }
+ 	 else
+ 	   {
+ 	     error("cannot open %s", "compile.err");
+ 	     zflag = 0;		/* no redirection */
+ 	   }
+        }
+      for (i = 0; i < n_commands ; i++)
+      {
+          j = commands[i].argv;
+          iii = spawnve(0, j[0], j, NULL);
+ 	 if(iii != 0)
+ 	     break;
+      }
+      if (zflag)
+        {
+ 	 Fforce(2, oldfd);
+ 	 Fclose(oldfd);
+ 	 Fclose(errfd);
+        }
+      if (iii != 0)
+        return -1;
+      else
+        return 0;
+  }
+ #endif /* atarist */  
  }
  
  /* Find all the switches given to us
***************
*** 2057,2062 ****
--- 2194,2200 ----
  
    /* Set up the default search paths.  */
  
+ #ifndef CROSSATARI
    if (gcc_exec_prefix)
      {
        add_prefix (&exec_prefix, gcc_exec_prefix, 0, 0, NULL_PTR);
***************
*** 2131,2136 ****
--- 2269,2275 ----
  	    endp++;
  	}
      }
+ #endif /* CROSSATARI */
  
    /* Use LPATH like LIBRARY_PATH (for the CMU build program).  */
    temp = getenv ("LPATH");
***************
*** 2339,2344 ****
--- 2478,2489 ----
  		  n_switches++;
  		  break;
  		}
+ #ifdef atarist
+ 	    case 'z':	/* redirect stderr to a file */
+ 	      zflag++;
+ 	      n_switches++;
+ 	      break;
+ #endif
  	    default:
  	      n_switches++;
  
***************
*** 2376,2386 ****
--- 2521,2542 ----
       (such as cpp) rather than those of the host system.  */
    /* Use 2 as fourth arg meaning try just the machine as a suffix,
       as well as trying the machine and the version.  */
+ #if (defined(atarist) || defined(CROSSATARI) || defined(WEIRD))
+ /* NB defined(WEIRD) should not really be there, its only for my weird setup */
+   /* We are not using machine_suffix here, so do not make */
+   /* these prefixes available only when we have one       */
+   add_prefix (&exec_prefix, standard_exec_prefix, 0, 0, NULL_PTR);
+   add_prefix (&exec_prefix, standard_exec_prefix_1, 0, 0, NULL_PTR);
+ 
+   add_prefix (&startfile_prefix, standard_exec_prefix, 0, 0, NULL_PTR);
+   add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 0, NULL_PTR);
+ #else
    add_prefix (&exec_prefix, standard_exec_prefix, 0, 2, NULL_PTR);
    add_prefix (&exec_prefix, standard_exec_prefix_1, 0, 2, NULL_PTR);
  
    add_prefix (&startfile_prefix, standard_exec_prefix, 0, 1, NULL_PTR);
    add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 1, NULL_PTR);
+ #endif /* (defined(atarist) || defined(CROSSATARI)) */
  
    add_prefix (&exec_prefix, concat (tooldir_prefix, "bin", "/"),
  	      0, 0, NULL_PTR);
***************
*** 2565,2570 ****
--- 2721,2735 ----
  /* Nonzero means that the input of this command is coming from a pipe.  */
  static int input_from_pipe;
  
+ #ifdef atarist
+ /* I don't know why this is necessary.  Recursive calls to do_spec_1
+    end up ignoring the error code from calls to execute().  That causes
+    do_spec to get a 0 return value, and do_spec_1("\n"), which causes the
+    command to get executed again.
+ */
+ int execute_return_error = 0;
+ #endif
+ 
  /* Process the spec SPEC and run the commands specified therein.
     Returns 0 if the spec is successfully processed; -1 if failed.  */
  
***************
*** 2585,2594 ****
--- 2750,2768 ----
  
    /* Force out any unfinished command.
       If -pipe, this forces out the last command if it ended in `|'.  */
+ #ifdef atarist
+   if (!value && execute_return_error)
+ 	{
+ 	value = execute_return_error;
+ 	execute_return_error = 0;
+ 	}
+ #endif
    if (value == 0)
      {
+ #ifndef atarist
        if (argbuf_index > 0 && !strcmp (argbuf[argbuf_index - 1], "|"))
  	argbuf_index--;
+ #endif
  
        if (argbuf_index > 0)
  	value = execute ();
***************
*** 2626,2631 ****
--- 2800,2856 ----
         Otherwise, NL, SPC, TAB and % are special.  */
      switch (inswitch ? 'a' : c)
        {
+ #if (defined(atarist) || defined(CROSSATARI))
+ /* this stuff added by jrd.  if see '$', expect name of env var, delimited
+    by '$'.  Find it's value, and subst it in.
+ 
+    modified by ERS to only collect things that look like names; this
+    saves e.g. the -$ arg. to cpp from getting munged */
+ 
+       case '$':
+       {
+ 	char varname[32];		/* should be enough */
+ 	char * value;			/* deciphered value string */
+ 	char *temp;
+ 	int i;
+ 	extern char *getenv(), *index();
+ 	
+ 	for (i = 0 ; ((c = *p) != '$') && isalnum(c) && i < 31 ; i++, p++)
+ 		varname[i] = c;
+ 	varname[i] = '\0';
+ 	if (strlen(varname) > 0) /* ++jrb fix */
+ 	{
+              	++p;    /* skip trailing '$' */
+ 		value = getenv(varname); /* ++jrb fix */
+ 		if (value)
+ 		{ /* if value is a path, only consider 1'st component */
+ #ifdef atarist
+ 			if((temp = index(value, ',')) == NULL)
+ 			    temp = index(value, ';');
+ #else
+ 			temp = index(value, ':');
+ #endif
+ 			if(temp != NULL)
+ 			{
+ 			    char *t = (char *) alloca(strlen(value) + 1);
+ 			    strcpy(t, value);
+ 			    t[temp-value] = '\0';
+ 			    do_spec_1(t, 0);
+ 			}
+ 			else
+ 			    do_spec_1(value, 0);
+ 		}
+ 		    else
+ 			do_spec_1(".", 0);	/* a compleat kludge... */
+ 	}
+         else
+         {
+              obstack_1grow(&obstack, '$');
+              arg_going = 1;
+         }
+       }
+      break;
+ #endif /* atarist */
        case '\n':
  	/* End of line: finish any pending argument,
  	   then run the pending command if one has been started.  */
***************
*** 2664,2669 ****
--- 2889,2898 ----
  	if (argbuf_index > 0)
  	  {
  	    value = execute ();
+ #ifdef atarist
+ 		if (!execute_return_error)
+ 			execute_return_error = value;
+ #endif
  	    if (value)
  	      return value;
  	  }
***************
*** 3279,3291 ****
--- 3508,3528 ----
  	    break;
  
  	  default:
+ #if 1 /* atarist */
+ 	    fprintf(stderr, "Bogus char '%c' found at pos %d of spec '%s'\n",
+ 		c, (p - spec - 1), spec);
+ #endif
  	    abort ();
  	  }
  	break;
  
+ #ifndef atarist
+       /* on the atari it is important to preserve backslash in spec */
+       /* so just let it go into default case */
        case '\\':
  	/* Backslash: treat next character as ordinary.  */
  	c = *p++;
+ #endif
  
  	/* fall through */
        default:
***************
*** 3562,3567 ****
--- 3799,3805 ----
  
  /* On fatal signals, delete all the temporary files.  */
  
+ #ifndef atarist
  static void
  fatal_error (signum)
       int signum;
***************
*** 3573,3578 ****
--- 3811,3817 ----
       so its normal effect occurs.  */
    kill (getpid (), signum);
  }
+ #endif
  
  int
  main (argc, argv)
***************
*** 3587,3592 ****
--- 3826,3836 ----
    char *specs_file;
    char *p;
  
+ #ifdef atarist
+ /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
+ /*  _malloczero(1); */ 	/* zero mallocs by default */
+   programname = "gcc";
+ #else  
    p = argv[0] + strlen (argv[0]);
    while (p != argv[0] && p[-1] != '/') --p;
    programname = p;
***************
*** 3603,3614 ****
--- 3847,3860 ----
    if (signal (SIGPIPE, SIG_IGN) != SIG_IGN)
      signal (SIGPIPE, fatal_error);
  #endif
+ #endif /* atarist */
  
    argbuf_length = 10;
    argbuf = (char **) xmalloc (argbuf_length * sizeof (char *));
  
    obstack_init (&obstack);
  
+ #if (!(defined(atarist) || defined(CROSSATARI)))
    /* Set up to remember the pathname of gcc and any options
       needed for collect.  We use argv[0] instead of programname because
       we need the complete pathname.  */
***************
*** 3616,3621 ****
--- 3862,3868 ----
    obstack_grow (&collect_obstack, "COLLECT_GCC=", sizeof ("COLLECT_GCC=")-1);
    obstack_grow (&collect_obstack, argv[0], strlen (argv[0])+1);
    putenv (obstack_finish (&collect_obstack));
+ #endif
  
    /* Choose directory for temp files.  */
  
***************
*** 3627,3632 ****
--- 3874,3888 ----
  
    process_command (argc, argv);
  
+ #if (defined(atarist) || defined(CROSSATARI))
+   {
+     char *temp;
+     
+     if((temp = getenv ("GCCEXEC")))
+ 	add_prefix (&exec_prefix, temp, 0, 0, 0);
+   }
+ #endif
+   
    /* Initialize the vector of specs to just the default.
       This means one element containing 0s, as a terminator.  */
  
***************
*** 3634,3639 ****
--- 3890,3899 ----
    bcopy (default_compilers, compilers, sizeof default_compilers);
    n_compilers = n_default_compilers;
  
+ 
+ #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
+   specs_file = 0;
+ #else
    /* Read specs from a file if there is one.  */
  
    machine_suffix = concat (spec_machine, "/", concat (spec_version, "/", ""));
***************
*** 3643,3648 ****
--- 3903,3909 ----
    /* Read the specs file unless it is a default one.  */
    if (specs_file != 0 && strcmp (specs_file, "specs"))
      read_specs (specs_file);
+ #endif
  
    /* If not cross-compiling, look for startfiles in the standard places.  */
    /* The fact that these are done here, after reading the specs file,
***************
*** 3695,3701 ****
--- 3956,3968 ----
  
    if (verbose_flag)
      {
+ #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
+ #include "PatchLev.h"
+       fprintf (stderr, "gcc-atariST version %s Patchlevel %s\n",
+ 	       version_string, PatchLevel);
+ #else
        fprintf (stderr, "gcc version %s\n", version_string);
+ #endif
        if (n_infiles == 0)
  	exit (0);
      }
***************
*** 3743,3749 ****
--- 4010,4021 ----
  
  	  input_basename = input_filename;
  	  for (p = input_filename; *p; p++)
+ #ifdef atarist
+ 		if (((*p == '/') || (*p == '\\')) && (*(p-1) != ':'))
+ 		    /* allow both '\' and '/' with  our new lib */
+ #else
  	    if (*p == '/')
+ #endif
  	      input_basename = p + 1;
  
  	  /* Find a suffix starting with the last period,
***************
*** 3806,3811 ****
--- 4078,4084 ----
        int i;
        int first_time;
  
+ #if (!(defined(atarist) || defined(CROSSATARI)))
        /* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables
  	 for collect.  */
        putenv_from_prefixes (&exec_prefix, "COMPILER_PATH=");
***************
*** 3836,3841 ****
--- 4109,4115 ----
  	}
        obstack_grow (&collect_obstack, "\0", 1);
        putenv (obstack_finish (&collect_obstack));
+ #endif
  
        value = do_spec (link_command_spec);
        if (value < 0)
===================================================================
RCS file: /net/acae127/home/bammi/etc/src/master/gnu/gcc/getpwd.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 getpwd.c
*** 1.1.1.1	1993/05/18 23:52:07
--- getpwd.c	1993/05/21 12:35:37
***************
*** 14,20 ****
     BSD systems) now provides getcwd as called for by POSIX.  Allow for
     the few exceptions to the general rule here.  */
  
! #if !(defined (POSIX) || defined (USG) || defined (VMS))
  #include <sys/param.h>
  extern char *getwd ();
  #define getcwd(buf,len) getwd(buf)
--- 14,20 ----
     BSD systems) now provides getcwd as called for by POSIX.  Allow for
     the few exceptions to the general rule here.  */
  
! #if !(defined (POSIX) || defined (USG) || defined (VMS) || defined(atarist) || defined(CROSSHPUX))
  #include <sys/param.h>
  extern char *getwd ();
  #define getcwd(buf,len) getwd(buf)
***************
*** 48,58 ****
    if (!p && !(errno = failure_errno))
      {
        if (! ((p = getenv ("PWD")) != 0
  	     && *p == '/'
  	     && stat (p, &pwdstat) == 0
  	     && stat (".", &dotstat) == 0
  	     && dotstat.st_ino == pwdstat.st_ino
! 	     && dotstat.st_dev == pwdstat.st_dev))
  
  	/* The shortcut didn't work.  Try the slow, ``sure'' way.  */
  	for (s = GUESSPATHLEN;  ! getcwd (p = xmalloc (s), s);  s *= 2)
--- 48,61 ----
    if (!p && !(errno = failure_errno))
      {
        if (! ((p = getenv ("PWD")) != 0
+ #ifndef atarist
  	     && *p == '/'
  	     && stat (p, &pwdstat) == 0
  	     && stat (".", &dotstat) == 0
  	     && dotstat.st_ino == pwdstat.st_ino
! 	     && dotstat.st_dev == pwdstat.st_dev
! #endif
! 	     ))
  
  	/* The shortcut didn't work.  Try the slow, ``sure'' way.  */
  	for (s = GUESSPATHLEN;  ! getcwd (p = xmalloc (s), s);  s *= 2)
===================================================================
RCS file: /net/acae127/home/bammi/etc/src/master/gnu/gcc/toplev.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 toplev.c
*** 1.1.1.1	1993/05/18 23:52:33
--- toplev.c	1993/05/21 12:35:41
***************
*** 31,37 ****
  
  #include <sys/stat.h>
  
! #ifdef USG
  #undef FLOAT
  #include <sys/param.h>
  /* This is for hpux.  It is a real screw.  They should change hpux.  */
--- 31,37 ----
  
  #include <sys/stat.h>
  
! #if defined(USG) || defined(CROSSHPUX)
  #undef FLOAT
  #include <sys/param.h>
  /* This is for hpux.  It is a real screw.  They should change hpux.  */
***************
*** 41,49 ****
--- 41,57 ----
  #undef FFS  /* Some systems define this in param.h.  */
  #else
  #ifndef VMS
+ #if (!(defined(atarist) || defined(atariminix)))
  #include <sys/time.h>
  #include <sys/resource.h>
+ #endif /* !(atarist || atariminix) */
+ #endif
  #endif
+ 
+ #ifdef atariminix
+ #include <sys/times.h>
+ /* #include <minix/const.h>, avoid dragging this in */
+ #define HZ 60	/* this is the only thing needed from minix/const.h */
  #endif
  
  #include "input.h"
***************
*** 58,63 ****
--- 66,76 ----
  #include "xcoffout.h"
  #endif
  
+ #ifdef atarist
+ long _stksize = -1L;	/* for all sizes of ST's */
+ 	/* -1 means malloc from own heap and keep all  of memory */
+ #endif /* atarist */
+ 
  #ifdef VMS
  /* The extra parameters substantially improve the I/O performance.  */
  static FILE *
***************
*** 769,775 ****
  int
  get_run_time ()
  {
! #ifdef USG
    struct tms tms;
  #else
  #ifndef VMS
--- 782,791 ----
  int
  get_run_time ()
  {
! #ifdef atarist
!   long now;
! #else
! #if (defined(USG) || defined(atariminix) || defined(CROSSHPUX))
    struct tms tms;
  #else
  #ifndef VMS
***************
*** 784,794 ****
      } vms_times;
  #endif
  #endif
  
    if (quiet_flag)
      return 0;
  
! #ifdef USG
    times (&tms);
    return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
  #else
--- 800,814 ----
      } vms_times;
  #endif
  #endif
+ #endif
  
    if (quiet_flag)
      return 0;
  
! #ifdef atarist
!   return(time(NULL) * 1000000);
! #else
! #if (defined(USG) || defined(atariminix) || defined(CROSSHPUX))
    times (&tms);
    return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
  #else
***************
*** 801,806 ****
--- 821,827 ----
    return (vms_times.proc_user_time + vms_times.proc_system_time) * 10000;
  #endif
  #endif
+ #endif
  }
  
  #define TIMEVAR(VAR, BODY)    \
***************
*** 1437,1442 ****
--- 1458,1464 ----
    longjmp (float_handler, 1);
  }
  
+ #ifndef atarist
  /* Handler for SIGPIPE.  */
  
  static void
***************
*** 1446,1451 ****
--- 1468,1474 ----
  {
    fatal ("output pipe has been closed");
  }
+ #endif
  
  /* Strip off a legitimate source ending from the input string NAME of
     length LEN. */
***************
*** 1479,1484 ****
--- 1502,1508 ----
      name[len - 4] = 0;
  }
  
+ #ifdef SYSV
  /* Output a file name in the form wanted by System V.  */
  
  void
***************
*** 1507,1512 ****
--- 1531,1537 ----
  #endif
  #endif
  }
+ #endif
  
  /* Routine to build language identifier for object file. */
  static void
***************
*** 1617,1623 ****
--- 1642,1652 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".jump");
+ #else
+       strcat (dumpname, ".jmp");
+ #endif
        jump_opt_dump_file = fopen (dumpname, "w");
        if (jump_opt_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1639,1645 ****
--- 1668,1678 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".loop");
+ #else
+       strcat (dumpname, ".lop");
+ #endif
        loop_dump_file = fopen (dumpname, "w");
        if (loop_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1650,1656 ****
--- 1683,1693 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".cse2");
+ #else
+       strcat (dumpname, ".cs2");
+ #endif
        cse2_dump_file = fopen (dumpname, "w");
        if (cse2_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1661,1667 ****
--- 1698,1708 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".flow");
+ #else
+       strcat (dumpname, ".flo");
+ #endif
        flow_dump_file = fopen (dumpname, "w");
        if (flow_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1672,1678 ****
--- 1713,1723 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 10);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".combine");
+ #else
+       strcat (dumpname, ".cmb");
+ #endif
        combine_dump_file = fopen (dumpname, "w");
        if (combine_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1683,1689 ****
--- 1728,1738 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 7);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".sched");
+ #else
+       strcat (dumpname, ".sch");
+ #endif
        sched_dump_file = fopen (dumpname, "w");
        if (sched_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1694,1700 ****
--- 1743,1753 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".lreg");
+ #else
+       strcat (dumpname, ".lrg");
+ #endif
        local_reg_dump_file = fopen (dumpname, "w");
        if (local_reg_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1705,1711 ****
--- 1758,1768 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".greg");
+ #else
+       strcat (dumpname, ".grg");
+ #endif
        global_reg_dump_file = fopen (dumpname, "w");
        if (global_reg_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1716,1722 ****
--- 1773,1783 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 8);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".sched2");
+ #else
+       strcat (dumpname, ".sc2");
+ #endif
        sched2_dump_file = fopen (dumpname, "w");
        if (sched2_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1727,1733 ****
--- 1788,1798 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 7);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".jump2");
+ #else
+       strcat (dumpname, ".jp2");
+ #endif
        jump2_opt_dump_file = fopen (dumpname, "w");
        if (jump2_opt_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1751,1757 ****
--- 1816,1826 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 10);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".stack");
+ #else
+       strcat (dumpname, ".stk");
+ #endif
        stack_reg_dump_file = fopen (dumpname, "w");
        if (stack_reg_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 2815,2826 ****
--- 2884,2905 ----
    int version_flag = 0;
    char *p;
  
+ #ifdef atarist
+ /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
+ /*  _malloczero(1); */ 	/* zero mallocs by default */
+ #endif  
+ 
    /* save in case md file wants to emit args as a comment.  */
    save_argc = argc;
    save_argv = argv;
  
    p = argv[0] + strlen (argv[0]);
+ #ifndef atarist
    while (p != argv[0] && p[-1] != '/') --p;
+ #else
+   while (p != argv[0] && ((p[-1] != '/') && (p[-1] != '\\') &&
+ 			  (p[-1] != ':'))) --p;
+ #endif
    progname = p;
  
  #ifdef RLIMIT_STACK
***************
*** 2837,2845 ****
--- 2916,2926 ----
  
    signal (SIGFPE, float_signal);
  
+ #ifndef atarist
  #ifdef SIGPIPE
    signal (SIGPIPE, pipe_closed);
  #endif
+ #endif
  
    decl_printable_name = decl_name;
    lang_expand_expr = (struct rtx_def *(*)()) do_abort;
***************
*** 2938,2943 ****
--- 3019,3034 ----
  	  else if (!strcmp (str, "dumpbase"))
  	    {
  	      dump_base_name = argv[++i];
+ #ifdef atarist
+ /* dump_base_name will typically be 'foo.c' here.  Need to truncate at the '.',
+    cause dots mean something here */
+ 	    {
+ 	      char * n = dump_base_name;
+ 	      for ( ; ((*n) && (*n != '.')) ; )
+ 		n++;
+ 	      *n = '\0';
+ 	    }
+ #endif
  	    }
  	  else if (str[0] == 'd')
  	    {
***************
*** 3348,3354 ****
--- 3439,3451 ----
       option flags in use.  */
    if (version_flag)
      {
+ #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
+ #include "PatchLev.h"
+ 	    fprintf (stderr, "%s version %s-atariST Patchlevel %s",
+ 		 language_string, version_string, PatchLevel);
+ #else
        fprintf (stderr, "%s version %s", language_string, version_string);
+ #endif
  #ifdef TARGET_VERSION
        TARGET_VERSION;
  #endif
***************
*** 3369,3374 ****
--- 3466,3473 ----
  
    compile_file (filename);
  
+ #if (!(defined(atarist) || defined(atariminix)))
+ #if (!(defined(CROSSHPUX)))
  #ifndef OS2
  #ifndef VMS
    if (flag_print_mem)
***************
*** 3387,3392 ****
--- 3486,3493 ----
      }
  #endif /* not VMS */
  #endif /* not OS2 */
+ #endif
+ #endif
  
    if (errorcount)
      exit (FATAL_EXIT_CODE);
***************
*** 3498,3500 ****
--- 3599,3632 ----
  
    fprintf (stderr, "\n");
  }
+ 
+ #ifdef atarist
+ void atari_output_filename(file, filename)
+ FILE *file;
+ char *filename;
+ {
+     if( (!file) || (!filename) ) return;
+     for(; *filename; filename++)
+     {
+ 	if(*filename == '\\') putc('\\', file);
+ 	putc(*filename, file);
+     }
+ }
+ 
+ #include <string.h>
+ 
+ char *atari_filename_nondirectory(p)
+ char *p;
+ {
+     char *s;
+     
+     for(s = p + strlen(p); s != p; --s)
+     {
+ 	if((*s == '/') || (*s == '\\'))
+ 	    break;
+     }
+     
+     return (s == p) ? p : s+1;
+ }
+ 
+ #endif
===================================================================
RCS file: /net/acae127/home/bammi/etc/src/master/gnu/gcc/varasm.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 varasm.c
*** 1.1.1.1	1993/05/18 23:52:37
--- varasm.c	1993/05/21 12:35:44
***************
*** 996,1009 ****
  assemble_external_libcall (fun)
       rtx fun;
  {
- #ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
    /* Declare library function name external when first used, if nec.  */
    if (! SYMBOL_REF_USED (fun))
      {
        SYMBOL_REF_USED (fun) = 1;
        ASM_OUTPUT_EXTERNAL_LIBCALL (asm_out_file, fun);
-     }
  #endif
  }
  
  /* Declare the label NAME global.  */
--- 996,1009 ----
  assemble_external_libcall (fun)
       rtx fun;
  {
    /* Declare library function name external when first used, if nec.  */
    if (! SYMBOL_REF_USED (fun))
      {
        SYMBOL_REF_USED (fun) = 1;
+ #ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
        ASM_OUTPUT_EXTERNAL_LIBCALL (asm_out_file, fun);
  #endif
+     }
  }
  
  /* Declare the label NAME global.  */
***************
*** 2266,2271 ****
--- 2266,2274 ----
  {
    struct rtx_const val0, val1;
  
+   if (XEXP (x, 0) == pc_rtx || XEXP (x, 1) == pc_rtx)
+     return XEXP (x, 0) == XEXP (x, 1) ? const0_rtx : x;
+ 
    decode_rtx_const (GET_MODE (x), XEXP (x, 0), &val0);
    decode_rtx_const (GET_MODE (x), XEXP (x, 1), &val1);
  
===================================================================
RCS file: /net/acae127/home/bammi/etc/src/master/gnu/gcc/config/m68k/m68k.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 m68k.c
*** 1.1.1.1	1993/05/18 23:53:20
--- m68k.c	1993/05/21 12:35:53
***************
*** 60,66 ****
     
  finalize_pic ()
  {
!   if (flag_pic && current_function_uses_pic_offset_table)
      emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
  }
  
--- 60,66 ----
     
  finalize_pic ()
  {
!   if (flag_pic && flag_pic < 3 && current_function_uses_pic_offset_table)
      emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
  }
  
***************
*** 213,219 ****
        asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
  #endif
      }
!   if (flag_pic && current_function_uses_pic_offset_table)
      {
  #ifdef MOTOROLA
        asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
--- 213,219 ----
        asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
  #endif
      }
!   if (flag_pic && flag_pic < 3 && current_function_uses_pic_offset_table)
      {
  #ifdef MOTOROLA
        asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
***************
*** 800,811 ****
    /* First handle a simple SYMBOL_REF or LABEL_REF */
    if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
      {
        if (reg == 0)
  	abort ();
  
!       pic_ref = gen_rtx (MEM, Pmode,
! 			 gen_rtx (PLUS, Pmode,
! 				  pic_offset_table_rtx, orig));
        current_function_uses_pic_offset_table = 1;
        RTX_UNCHANGING_P (pic_ref) = 1;
        emit_move_insn (reg, pic_ref);
--- 800,819 ----
    /* First handle a simple SYMBOL_REF or LABEL_REF */
    if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
      {
+ #ifdef LEGITIMATE_BASEREL_OPERAND_P
+       if (LEGITIMATE_BASEREL_OPERAND_P (orig))
+ 	return orig;
+ #endif
+ 
        if (reg == 0)
  	abort ();
  
!       if (flag_pic == 3)
!         pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
!       else
!         pic_ref = gen_rtx (MEM, Pmode,
! 			   gen_rtx (PLUS, Pmode,
! 				    pic_offset_table_rtx, orig));
        current_function_uses_pic_offset_table = 1;
        RTX_UNCHANGING_P (pic_ref) = 1;
        emit_move_insn (reg, pic_ref);
***************
*** 1793,1798 ****
--- 1801,1809 ----
        output_address (XEXP (op, 0));
        if (letter == 'd' && ! TARGET_68020
  	  && CONSTANT_ADDRESS_P (XEXP (op, 0))
+ 	  && !(TARGET_PC_REL && GET_CODE (XEXP (op, 0)) == SYMBOL_REF
+ 	       && SYMBOL_REF_FLAG (XEXP (op, 0))
+ 	       && !SYMBOL_REF_USED (XEXP (op, 0)))
  	  && !(GET_CODE (XEXP (op, 0)) == CONST_INT
  	       && INTVAL (XEXP (op, 0)) < 0x8000
  	       && INTVAL (XEXP (op, 0)) >= -0x8000))
***************
*** 2100,2105 ****
--- 2111,2118 ----
  	          fprintf (file, ":w");
  	        if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
  	          fprintf (file, ":l");
+ 	        if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
+ 	          fprintf (file, ":w");
  	      }
  	    if (addr != 0 && ireg != 0)
  	      {
***************
*** 2177,2182 ****
--- 2190,2207 ----
  	    fprintf (file, "%d:w", INTVAL (addr));
  #endif
  	  }
+ 	else if (TARGET_PC_REL && GET_CODE (addr) == SYMBOL_REF
+ 		 && SYMBOL_REF_FLAG (addr) && !SYMBOL_REF_USED (addr))
+ 	  {
+ #ifdef MOTOROLA
+ 	    output_addr_const (file, addr);
+ 	    fputs ("(pc)", file);
+ #else
+ 	    fputs ("pc@(", file);
+ 	    output_addr_const (file, addr);
+ 	    putc (')', file);
+ #endif
+ 	  }
  	else
  	  {
  	    output_addr_const (file, addr);
***************
*** 2243,2245 ****
--- 2268,2286 ----
  
    return 0;
  }
+ 
+ #ifdef ENCODE_SECTION_INFO
+ /* Does operand (which is a symbolic_operand) live in text space? If
+    so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.*/
+ 
+ int
+ read_only_operand (operand)
+      rtx operand;
+ {
+   if (GET_CODE (operand) == CONST)
+     operand = XEXP (XEXP (operand, 0), 0);
+   if (GET_CODE (operand) == SYMBOL_REF)
+     return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
+   return 1;
+ }
+ #endif
===================================================================
RCS file: /net/acae127/home/bammi/etc/src/master/gnu/gcc/config/m68k/m68k.h,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 m68k.h
*** 1.1.1.1	1993/05/18 23:53:20
--- m68k.h	1993/05/21 12:35:56
***************
*** 92,97 ****
--- 92,103 ----
  /* Use the 68040-only fp instructions (-m68040).  */
  #define TARGET_68040_ONLY (target_flags & 01000)
  
+ /* Use PC-relative addressing for refs to read-only data */
+ #define TARGET_PC_REL (target_flags & 02000)
+ 
+ /* Use base-relative addressing for refs to data&bss segments */
+ #define TARGET_BASE_REL (target_flags & 04000)
+ 
  /* Macro to define tables used to set the flags.
     This is a list in braces of pairs in braces,
     each pair being { "NAME", VALUE }
***************
*** 119,124 ****
--- 125,134 ----
      { "68030", -01400},				\
      { "68030", 5},				\
      { "68040", 01007},			\
+     { "pcrel", 02000},				\
+     { "nopcrel", -02000},			\
+     { "baserel", 04000},			\
+     { "nobaserel", -04000},			\
      { "", TARGET_DEFAULT}}
  /* TARGET_DEFAULT is defined in sun*.h and isi.h, etc.  */
  
***************
*** 130,141 ****
--- 140,153 ----
    if (TARGET_FPA) target_flags &= ~2;	\
    if (! TARGET_68020 && flag_pic == 2)	\
      error("-fPIC is not currently supported on the 68000 or 68010\n");	\
+   if (TARGET_BASE_REL) flag_pic = 3;	\
  }
  #else
  #define OVERRIDE_OPTIONS		\
  {					\
    if (! TARGET_68020 && flag_pic == 2)	\
      error("-fPIC is not currently supported on the 68000 or 68010\n");	\
+   if (TARGET_BASE_REL) flag_pic = 3;	\
  }
  #endif /* defined SUPPORT_SUN_FPA */
  
***************
*** 339,344 ****
--- 351,359 ----
  {                                               \
    if (flag_pic)                                 \
      fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
+   /* prevent saving/restoring of the base reg */ \
+   if (flag_pic == 3)				 \
+     call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
  }
  
  #else /* defined SUPPORT_SUN_FPA */
***************
*** 363,368 ****
--- 378,386 ----
      } 						\
    if (flag_pic)                                 \
      fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
+   /* prevent saving/restoring of the base reg */ \
+   if (flag_pic == 3)				 \
+     call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
  }
  
  #endif /* defined SUPPORT_SUN_FPA */
***************
*** 1129,1134 ****
--- 1147,1154 ----
         && GET_CODE (XEXP (X, 1)) == CONST_INT				\
         && ((unsigned) INTVAL (XEXP (X, 1)) + 0x8000) < 0x10000)		\
     || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
+        && flag_pic == 3 && CONSTANT_ADDRESS_P (XEXP (X, 1)))		\
+    || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
         && flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)		\
     || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\
         && flag_pic && GET_CODE (XEXP (X, 1)) == LABEL_REF))		\
===================================================================
RCS file: /net/acae127/home/bammi/etc/src/master/gnu/gcc/config/m68k/m68k.md,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 m68k.md
*** 1.1.1.1	1993/05/18 23:53:21
--- m68k.md	1993/05/21 12:35:59
***************
*** 704,716 ****
  {
    if (flag_pic && symbolic_operand (operands[1], SImode)) 
      {
!       /* The source is an address which requires PIC relocation.  
!          Call legitimize_pic_address with the source, mode, and a relocation
!          register (a new pseudo, or the final destination if reload_in_progress
!          is set).   Then fall through normally */
!       extern rtx legitimize_pic_address();
!       rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
!       operands[1] = legitimize_pic_address (operands[1], SImode, temp);
      }
  }")
  
--- 704,721 ----
  {
    if (flag_pic && symbolic_operand (operands[1], SImode)) 
      {
! #ifdef LEGITIMATE_BASEREL_OPERAND_P
!       if (flag_pic != 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
! #endif
!       {
!         /* The source is an address which requires PIC relocation.  
!            Call legitimize_pic_address with the source, mode, and a relocation
!            register (a new pseudo, or the final destination if reload_in_progress
!            is set).   Then fall through normally */
!         extern rtx legitimize_pic_address();
!         rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
!         operands[1] = legitimize_pic_address (operands[1], SImode, temp);
!       }
      }
  }")
  
***************
*** 4747,4753 ****
    ""
    "
  {
!   if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  #ifdef MOTOROLA
      SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
  #else
--- 4752,4758 ----
    ""
    "
  {
!   if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  #ifdef MOTOROLA
      SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
  #else
***************
*** 4762,4768 ****
  	 (match_operand:SI 1 "general_operand" "g"))]
    ;; Operand 1 not really used on the m68000.
  
!   "! flag_pic"
    "*
  #ifdef MOTOROLA
    return \"jsr %0\";
--- 4767,4773 ----
  	 (match_operand:SI 1 "general_operand" "g"))]
    ;; Operand 1 not really used on the m68000.
  
!   "(! flag_pic || flag_pic == 3)"
    "*
  #ifdef MOTOROLA
    return \"jsr %0\";
***************
*** 4777,4783 ****
  	 (match_operand:SI 1 "general_operand" "g"))]
    ;; Operand 1 not really used on the m68000.
  
!   "flag_pic"
    "*
  #ifdef MOTOROLA
    if (GET_CODE (operands[0]) == MEM 
--- 4782,4788 ----
  	 (match_operand:SI 1 "general_operand" "g"))]
    ;; Operand 1 not really used on the m68000.
  
!   "(flag_pic && flag_pic < 3)"
    "*
  #ifdef MOTOROLA
    if (GET_CODE (operands[0]) == MEM 
***************
*** 4798,4804 ****
    ""
    "
  {
!   if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  #ifdef MOTOROLA
      SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
  #else
--- 4803,4809 ----
    ""
    "
  {
!   if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  #ifdef MOTOROLA
      SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
  #else
***************
*** 4813,4819 ****
  	(call (match_operand:QI 1 "memory_operand" "o")
  	      (match_operand:SI 2 "general_operand" "g")))]
    ;; Operand 2 not really used on the m68000.
!   "! flag_pic"
    "*
  #ifdef MOTOROLA
    return \"jsr %1\";
--- 4818,4824 ----
  	(call (match_operand:QI 1 "memory_operand" "o")
  	      (match_operand:SI 2 "general_operand" "g")))]
    ;; Operand 2 not really used on the m68000.
!   "(! flag_pic || flag_pic == 3)"
    "*
  #ifdef MOTOROLA
    return \"jsr %1\";
***************
*** 4828,4834 ****
  	(call (match_operand:QI 1 "memory_operand" "o")
  	      (match_operand:SI 2 "general_operand" "g")))]
    ;; Operand 2 not really used on the m68000.
!   "flag_pic"
    "*
  #ifdef MOTOROLA
    if (GET_CODE (operands[1]) == MEM 
--- 4833,4839 ----
  	(call (match_operand:QI 1 "memory_operand" "o")
  	      (match_operand:SI 2 "general_operand" "g")))]
    ;; Operand 2 not really used on the m68000.
!   "(flag_pic && flag_pic < 3)"
    "*
  #ifdef MOTOROLA
    if (GET_CODE (operands[1]) == MEM 

